package com.boarsoft.boar.demo.order.service;

import com.boarsoft.boar.demo.order.entity.PocOrder;
import com.boarsoft.cache.aop.Cached;

/**
 * @ClassName:  OrderService   
 * @Description:订单服务
 * @author: 
 * @date:   2019年2月15日 上午9:50:59   
 *     
 * @Copyright: 2019
 */
public interface PocOrderService {
	
	/**
	 * @Title: place   
	 * @Description: 下单
	 * @param:  order
	 * @return: boolean      
	 * @throws
	 */
	boolean place(PocOrder order);
	
	/**
	 * @Title: finish   
	 * @Description: 支付订单  
	 * @param: order
	 * @param:  callType 为true用于测试支付时发生例外的情况
	 * @return: boolean      
	 * @throws
	 */
	boolean finish(PocOrder order, boolean callType);
	
	/**
	 * @Title: cancel   
	 * @Description: 取消订单   
	 * @param:  order
	 * @return: boolean      
	 * @throws
	 */
//	boolean cancel(PocOrder order);

	/**
	 * @Title: findOrderById   
	 * @Description: 查询订单   
	 * @param:  tenantId
	 * @param:  orderId
	 * @param:  userId
	 * @param:  orderBy
	 * @param:  pageNo
	 * @param:  pageSize
	 * @return: PagedResult<PocOrder>      
	 * @throws
	 */
	@Cached(group = "order", index = 1)
	PocOrder find(int tenantId, int orderId);

	
	/**
	 * @Title: findOrder   
	 * @Description: 查询订单   
	 * @param:  tenantId
	 * @param:  orderId
	 * @param:  userId
	 * @param:  orderBy
	 * @param:  pageNo
	 * @param:  pageSize
	 * @return: PagedResult<PocOrder>      
	 * @throws
	 */
//	PagedResult<PocOrder> findOrder(int tenantId, int orderId, int userId, String orderBy, int pageNo, int pageSize);
}
